package com.bawei.mall.product.factory;

import com.bawei.common.core.web.page.TableDataInfo;
import com.bawei.mall.product.domain.Advertise;
import com.bawei.mall.product.remote.RemoteAdvertiseInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author DongZl
 * @description: 远程调用服务的熔断
 * @Date 2022-10-15 上午 08:42
 */
@Component
public class RemoteAdvertiseInfoFallbackFactory implements FallbackFactory<RemoteAdvertiseInfo> {

    private final static Logger log = LoggerFactory.getLogger(RemoteAdvertiseInfoFallbackFactory.class);


    @Override
    public RemoteAdvertiseInfo create(Throwable cause) {
        return new RemoteAdvertiseInfo() {
            @Override
            public TableDataInfo list(Advertise advertise) {
                return null;
            }
        };
    }
}
